import request from '@/utils/http.js'

// 获取部门列表 /company/department

export function getDepartmentList(params){
    return request({
        url: '/company/department',
        params
    })
}

// 新增部门
export function addDept(data){
    return request({
        url: '/company/department',
        method: 'POST',
        data
    })
}

// 修改部门
export function editDept(data){
    return request({
        url: `/company/department/${data.id}`,
        method: 'put',
        data
    })
}

// 获取-部门负责人列表 /sys/user/simple

export function getUserList(){
    return request({
        url: '/sys/user/simple'
    })
}

// 删除部门/company/department/{id}
export function delDept(id){
    return request({
        url: `/company/department/${id}`,
        method: 'DELETE'
    })
}
